package com.example.tests;

import java.util.Set;

import org.testng.annotations.Test;

public class ContactRemovalTests extends TestBase {

    @Test
    public void testFirstContactCanBeRemoved() throws Exception {		
    	Set<ContactObject> oldList = app.getContactHelper().getContacts();
		if (oldList.size() == 0){			
			ContactObject contactObject = new ContactObject()
			.setFirstname("")
			.setLastname("")
			.setAddress("")
			.setHome("")
			.setMobile("")
			.setWork("")
			.setEmail("")
			.setEmail2("")
			.setBday("1")
			.setBmonth("January")
			.setByear("2001")
			.setGroup("[none]")
			.setAddress2("")
			.setPhone2("");
			app.getContactHelper().createContact(contactObject);
		    oldList.add(contactObject);
		}
	    app.getContactHelper().deleteContact(0);
		Set<ContactObject> newList = app.getContactHelper().getContacts();
		verifyContactDeleted(oldList, newList);
    }	
	
}